//#include <opencv2/core/core.hpp>
//#include "opencv2/imgproc/imgproc.hpp"
//#include <opencv2/highgui/highgui.hpp>
//#include <stdlib.h>
//#include <stdio.h>
//#include <iostream>
//#include <gtkmm/main.h>
//#include <gtkmm/window.h>
//#include <gtkmm/button.h>
//#include <cairomm/context.h>
//#include <gdkmm/general.h> // set_source_pixbuf()
//#include <glibmm/fileutils.h>
//#include <iostream>
//#include "../gui/MatWidget.h"
//#include <string>
//
////These might all go into one filters.h
//#include "../filters/BlurFilter.h"
//using namespace cv;
//using namespace std;
//using namespace openlid;
//const int FRAMERATE = 10;

//Mat testMat; //(10,10 CV_8UC3,Scalar(255,255,0));
//MatWidget* mw;
//BlurFilter blurFilter;
//VideoCapture cap(1);
//
//void buttonClicked() {
//	cout << "Clicked!" << endl;
//
//	blurFilter.apply(testMat);
//}
//
//bool timerCallback() {
//	cout << "."; //<<endl;
//	//Mat m;
//	cap >> testMat;	//*testMat;
//	cout<<"w"<<testMat.cols << " h" << testMat.rows << " c" << testMat.channels()<< " d" << testMat.depth() << " t" << testMat.type() << endl;
//	mw->set_mat(testMat);
//	//imshow("mooo", m);
//	return true;
//}
//int mainz(int argc, char** argv) {
//	Gtk::Main kit(argc, argv);
//
//	Gtk::Window win;
//	if (!cap.isOpened()) {
//		cout << "No camera!" << endl;
//		return 1;
//	}
//  testMat = Mat(100,100,CV_8UC3,Scalar(255,255,0));
//
//	//Mat m(100,100,CV_8UC3,Scalar(255,255,0));
//	mw = new MatWidget(testMat);
//	//mw->set_mat(testMat);
//	win.set_title("DrawingArea");
//	win.set_default_size(300, 200);
//
//	//testMat = new Mat(imread("images/pic2.png", CV_LOAD_IMAGE_COLOR));//(100,100,CV_8UC3,Scalar::all(0));
////  if(!testMat.data) {
////	  cout << "No image!" << endl;
////	  return 1;
////  }
//
//	//imshow("mooo", testMat);
//
//	//moveWindow("mooo", 300,0);
//
//	Gtk::Button btn("Hiya!");
//
//	btn.signal_clicked().connect(sigc::ptr_fun(&buttonClicked));
//
//	//MatWidget mw(testMat);
//
//	//win.add(btn);
//	win.add(*mw);
//	win.show_all_children();
//
//	//sigc::connection conn = Glib::signal_timeout().connect(sigc::ptr_fun(&timerCallback), 1000 / FRAMERATE);
//
//	Gtk::Main::run(win);
//
//	return 0;
//}

/**
 * @function main
 */
//int main( int argc, char** argv )
//{
//
//	  Glib::RefPtr<Gtk::Application> app =
//	    Gtk::Application::create(argc, argv,
//	      "org.gtkmm.examples.base");
//
//	  Gtk::ApplicationWindow window;
//
//	  Mat testMat(100,100,CV_8UC3,Scalar::all(255));
//
//	  MatWidget mw(testMat);
//
//	  //Gtk::set_size_request(pb->get_width(), pb->get_height());
//	  return app->run(window);
//
//
//	cout <<"this bit" << endl;
//  /// Create a window to display results
////  namedWindow( window_name, CV_WINDOW_AUTOSIZE );
////
//////  namedWindow("source", CV_WINDOW_AUTOSIZE);
//////  imshow("source", src);
////
////  /// Create Trackbar to choose type of Threshold
////  createTrackbar( "One",
////          window_name, &threshold_type,
////          max_type, Threshold_Demo );
////
////  createTrackbar( "two",
////          window_name, &threshold_value,
////          max_value, Threshold_Demo );
////
////  string tbnm = "two";
////
////  Mat buttonMat(100,100,CV_8UC3,Scalar::all(255));
////  //createButton(tbnm,&buttonPush);//,NULL,CV_PUSH_BUTTON,0);
////  /// Call the function to initialize
////  namedWindow("buttonWindow", CV_WINDOW_AUTOSIZE);
////
////  imshow("buttonWindow", buttonMat);
////
////
////  VideoCapture cap(0); // open the default camera
////  if(!cap.isOpened())  // check if we succeeded
////      return -1;
////
////  Mat edges;
////  namedWindow("edges",1);
////  for(;;)
////  {
////      Mat frame;
////      cap >> frame; // get a new frame from camera
////      cvtColor(frame, edges, CV_BGR2GRAY);
////      GaussianBlur(edges, edges, Size(7,7), 1.5, 1.5);
////      Canny(edges, edges, 0, 30, 3);
////      imshow("edges", edges);
////      if(waitKey(30) >= 0) break;
////  }
////
////
////
////  Threshold_Demo( 0, 0 );
////
////
////
////  /// Wait until user finishes program
////  while(true)
////    {
////      int c;
////      c = waitKey( 20 );
////      if( (char)c == 27 )
////    { break; }
////    }
//
//}
